package com.dream21th.dream21thredis.handler;

import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;

import java.util.Map;

import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.dream21th.dream21thredis.annotation.Encode;
import com.dream21th.dream21thredis.exception.FlowException;
import com.dream21th.dream21thredis.util.HttpUtils;
import com.dream21th.dream21thredis.util.IpUtils;
import com.dream21th.dream21thredis.util.RestUtils;
import com.dream21th.dream21thredis.util.SpringUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * https://www.cnblogs.com/EasonJim/p/7727012.html
 * https://www.cnblogs.com/EasonJim/p/7704740.html
 * 
 *https://blog.csdn.net/qq_18495465/article/details/78470939
 */
@Slf4j
public class ParamsHandler extends HandlerInterceptorAdapter {

	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
		log.info("--------------------------------ParamsHandler");
		/*JSONObject json = JSONObject.parseObject(RestUtils.getRequestParameter(request, response));
		
		for (Map.Entry<String, Object> entry : json.entrySet()) {
            System.out.println(entry.getKey() + ":" + entry.getValue());
        }*/
		
		

		return true;
	}

}
